From minyal at nortelnetworks.com Mon Mar 1 09:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon Mar 1 15:49:35 2004 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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.linuxgrrls.org/pipermail/rxtx/attachments/20040301/6cbe9a25/attachment.html From taj at www.linux.org.uk Mon Mar 1 16:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Mar 1 16:47:33 2004 Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj@www.linux.org.uk From achu at cypressasia.com Tue Mar 2 09:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue Mar 2 01:46:36 2004 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Tue Mar 2 03:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 2 03:52:10 2004 Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 01:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue Mar 2 07:42:36 2004 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040302/2a441714/attachment.html From taj at www.linux.org.uk Tue Mar 2 08:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 2 08:03:13 2004 Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj@www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 10:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue Mar 2 10:14:42 2004 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj@www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry@12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry@12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 10:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue Mar 2 10:14:43 2004 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 16:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue Mar 2 15:03:56 2004 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 15:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 2 15:33:43 2004 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx@linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 19:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue Mar 2 18:42:36 2004 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 19:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 2 19:03:12 2004 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj@www.linux.org.uk From achu at cypressasia.com Wed Mar 3 15:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed Mar 3 07:20:03 2004 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx@linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 12:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed Mar 3 11:33:15 2004 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 19:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 3 19:32:07 2004 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj@www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 09:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu Mar 4 08:51:03 2004 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 09:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu Mar 4 08:56:10 2004 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 09:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Mar 4 09:13:25 2004 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj@www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 10:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu Mar 4 09:35:05 2004 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 09:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Mar 4 09:37:49 2004 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj@www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 10:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Mar 5 09:03:18 2004 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 11:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Mar 5 11:29:11 2004 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj@www.linux.org.uk From jimo at earthlink.net Sun Mar 7 10:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun Mar 7 18:45:41 2004 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040307/244cae10/attachment.html From taj at www.linux.org.uk Sun Mar 7 20:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun Mar 7 20:11:55 2004 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj@www.linux.org.uk From jimo at earthlink.net Sun Mar 7 17:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Mon Mar 8 01:35:16 2004 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 12:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon Mar 8 12:36:15 2004 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 15:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Mar 8 14:57:25 2004 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 15:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon Mar 8 15:23:11 2004 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Tue Mar 9 00:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue Mar 9 06:07:47 2004 Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Tue Mar 9 06:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 9 06:26:22 2004 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj@www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 09:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue Mar 9 07:27:21 2004 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. From dan at sync.ro Tue Mar 16 11:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue Mar 16 09:26:51 2004 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 17:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 16 09:50:50 2004 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.linuxgrrls.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment.html From taj at www.linux.org.uk Tue Mar 16 11:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 16 11:11:02 2004 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 16:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 16 21:00:45 2004 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 16:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 16 21:01:38 2004 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 Wed Mar 17 11:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed Mar 17 03:29:45 2004 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.linuxgrrls.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment.html From taj at www.linux.org.uk Wed Mar 17 04:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 17 03:58:34 2004 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 Wed Mar 17 13:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed Mar 17 05:12:29 2004 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.linuxgrrls.org/pipermail/rxtx/attachments/20040317/092150e2/attachment.html From arundeep78 at yahoo.com Tue Mar 16 22:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed Mar 17 06:01:21 2004 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 Wed Mar 17 14:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed Mar 17 06:09:16 2004 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.linuxgrrls.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment.html From dan at sync.ro Wed Mar 17 08:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed Mar 17 06:19:46 2004 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 Wed Mar 17 06:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 17 06:20:48 2004 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 Wed Mar 17 06:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 17 06:43:12 2004 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 Tue Mar 16 23:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed Mar 17 07:19:42 2004 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 02:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed Mar 17 10:17:31 2004 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 08:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed Mar 17 13:53:46 2004 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 14:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 17 14:36:07 2004 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 12:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 17 14:43:42 2004 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 Thu Mar 18 06:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu Mar 18 06:10:00 2004 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 $B%8%e%I!!%?%G%*!!(BA$B!#!!%"%k%]%s(B ============================================ 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.linuxgrrls.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment.html From taj at www.linux.org.uk Thu Mar 18 06:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Mar 18 06:44:19 2004 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 07:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Thu Mar 18 07:15:59 2004 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 09:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Mar 18 09:35:25 2004 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 15:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun Mar 21 14:58:42 2004 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 15:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun Mar 21 15:05:30 2004 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 17:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun Mar 21 17:01:37 2004 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 17:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun Mar 21 17:28:28 2004 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 17:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun Mar 21 17:35:45 2004 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 19:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun Mar 21 19:51:45 2004 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 20:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun Mar 21 20:01:35 2004 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 21:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun Mar 21 20:54:16 2004 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 Mon Mar 22 01:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon Mar 22 00:56:33 2004 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 Mon Mar 22 03:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Mar 22 03:07:17 2004 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 Mon Mar 22 05:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Mon Mar 22 05:17:30 2004 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 Mon Mar 22 05:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Mar 22 05:28:05 2004 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 Mon Mar 22 05:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Mar 22 05:46:45 2004 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 mringwal at inf.ethz.ch Mon Mar 22 21:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon Mar 22 22:29:58 2004 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 22:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon Mar 22 22:32:28 2004 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 22:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Mar 22 22:40:04 2004 Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj@www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 09:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue Mar 23 09:21:08 2004 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 14:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 23 14:15:33 2004 Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 09:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 24 09:27:24 2004 Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj@www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0001.obj From taj at www.linux.org.uk Thu Mar 25 07:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Mar 25 07:13:51 2004 Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 22:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun Mar 28 21:54:54 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 22:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun Mar 28 22:02:41 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 11:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon Mar 29 10:54:40 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 20:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Mar 29 19:51:36 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj@www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 11:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon Mar 29 19:56:39 2004 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 21:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Mar 29 21:12:58 2004 Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 22:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon Mar 29 22:20:15 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 23:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Mar 29 23:12:50 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj@www.linux.org.uk From dmarkman at mac.com Tue Mar 30 06:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 30 06:20:39 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj@www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj@www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj@www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 09:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue Mar 30 08:53:28 2004 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 10:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue Mar 30 10:39:38 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 12:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 30 12:21:18 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 13:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 30 13:45:47 2004 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 22:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 30 22:16:11 2004 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment.html From minyal at nortelnetworks.com Tue Mar 30 22:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 30 22:19:56 2004 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx@linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040330/3510610c/attachment.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 22:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue Mar 30 22:24:17 2004 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 23:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 30 23:09:05 2004 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut@med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040330/91be911f/attachment.html From taj at www.linux.org.uk Tue Mar 30 23:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 30 23:41:15 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj@www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx@linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 11:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed Mar 31 11:00:18 2004 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj@www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx@linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 12:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed Mar 31 12:50:09 2004 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 14:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 31 14:00:20 2004 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj@www.linux.org.uk From we_ve at web.de Wed Mar 31 19:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed Mar 31 18:57:52 2004 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 19:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 31 19:14:16 2004 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj@www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 18:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed Mar 31 21:38:09 2004 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 22:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Mar 31 21:50:15 2004 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn@data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj@www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 19:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed Mar 31 22:17:30 2004 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn@data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 15:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040301/6cbe9a25/attachment.htm From taj at www.linux.org.uk Mon Mar 1 16:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj@www.linux.org.uk From achu at cypressasia.com Tue Mar 2 01:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Tue Mar 2 03:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:08 2005 Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 00:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040302/2a441714/attachment.htm From taj at www.linux.org.uk Tue Mar 2 08:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj@www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 09:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj@www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry@12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry@12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 09:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 15:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 15:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx@linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 18:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 19:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj@www.linux.org.uk From achu at cypressasia.com Wed Mar 3 07:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx@linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 11:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 19:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj@www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 08:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 08:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 09:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:09 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj@www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 09:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 09:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj@www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 09:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 11:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj@www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040307/244cae10/attachment.htm From taj at www.linux.org.uk Sun Mar 7 20:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj@www.linux.org.uk From jimo at earthlink.net Mon Mar 8 01:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 12:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 15:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 15:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Tue Mar 9 06:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Tue Mar 9 06:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj@www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 07:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 17:46:10 2005 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. From dan at sync.ro Tue Mar 16 09:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Fri Jun 3 17:46:11 2005 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 09:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 17:46:11 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment.htm From taj at www.linux.org.uk Tue Mar 16 11:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:11 2005 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 21:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:11 2005 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 21:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:11 2005 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 Wed Mar 17 03:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 17:46:11 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment.htm From taj at www.linux.org.uk Wed Mar 17 04:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:11 2005 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 Wed Mar 17 05:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 17:46:11 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040317/092150e2/attachment.htm From arundeep78 at yahoo.com Wed Mar 17 06:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Fri Jun 3 17:46:11 2005 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 Wed Mar 17 06:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 17:46:12 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment.htm From dan at sync.ro Wed Mar 17 06:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Fri Jun 3 17:46:12 2005 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 Wed Mar 17 06:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:12 2005 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 Wed Mar 17 06:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:12 2005 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 07:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Fri Jun 3 17:46:12 2005 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 10:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Fri Jun 3 17:46:12 2005 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 13:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Fri Jun 3 17:46:12 2005 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 14:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:12 2005 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 12:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:12 2005 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 Thu Mar 18 06:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 17:46:12 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment.htm From taj at www.linux.org.uk Thu Mar 18 06:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:12 2005 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 07:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Fri Jun 3 17:46:12 2005 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 09:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:13 2005 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 15:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 17:46:13 2005 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 15:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:13 2005 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 17:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 17:46:13 2005 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 17:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:13 2005 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 17:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:13 2005 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 19:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 17:46:13 2005 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 20:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 17:46:13 2005 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 21:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 17:46:13 2005 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 Mon Mar 22 01:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 17:46:13 2005 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 Mon Mar 22 03:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:13 2005 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 Mon Mar 22 05:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Fri Jun 3 17:46:14 2005 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 Mon Mar 22 05:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:14 2005 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 Mon Mar 22 05:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:14 2005 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 mringwal at inf.ethz.ch Mon Mar 22 21:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 22:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 22:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj@www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 09:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 14:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 09:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj@www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0002.obj From taj at www.linux.org.uk Thu Mar 25 07:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 22:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 22:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 11:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 17:46:14 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 20:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj@www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 11:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 21:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 22:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 23:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj@www.linux.org.uk From dmarkman at mac.com Tue Mar 30 06:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj@www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj@www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj@www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 09:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 10:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 12:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 13:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 22:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment.htm From minyal at nortelnetworks.com Tue Mar 30 22:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 17:46:15 2005 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx@linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040330/3510610c/attachment.htm From Daniel.Eisenhut at med.ge.com Tue Mar 30 22:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 23:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut@med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040330/91be911f/attachment.htm From taj at www.linux.org.uk Tue Mar 30 23:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj@www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx@linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 11:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj@www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx@linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 12:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 14:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj@www.linux.org.uk From we_ve at web.de Wed Mar 31 19:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 19:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj@www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 18:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 22:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:16 2005 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn@data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj@www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 19:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Fri Jun 3 17:46:17 2005 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn@data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 15:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 18:08:31 2005 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040301/6cbe9a25/attachment-0001.htm From taj at www.linux.org.uk Mon Mar 1 16:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:31 2005 Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj@www.linux.org.uk From achu at cypressasia.com Tue Mar 2 01:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Fri Jun 3 18:08:31 2005 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Tue Mar 2 03:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:31 2005 Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 00:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 18:08:31 2005 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0001.htm From taj at www.linux.org.uk Tue Mar 2 08:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:31 2005 Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj@www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 09:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj@www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry@12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry@12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 09:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 15:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 15:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx@linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 18:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 19:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj@www.linux.org.uk From achu at cypressasia.com Wed Mar 3 07:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx@linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 11:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 19:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj@www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 08:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 08:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 09:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj@www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 09:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 09:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj@www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 09:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 11:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:32 2005 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj@www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Fri Jun 3 18:08:33 2005 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0001.htm From taj at www.linux.org.uk Sun Mar 7 20:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:33 2005 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj@www.linux.org.uk From jimo at earthlink.net Mon Mar 8 01:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Fri Jun 3 18:08:33 2005 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 12:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:33 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 15:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:33 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 15:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:33 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Tue Mar 9 06:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Fri Jun 3 18:08:33 2005 Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Tue Mar 9 06:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:33 2005 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj@www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 07:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 18:08:33 2005 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. From dan at sync.ro Tue Mar 16 09:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Fri Jun 3 18:08:33 2005 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 09:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 18:08:34 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0001.htm From taj at www.linux.org.uk Tue Mar 16 11:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:34 2005 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 21:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:34 2005 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 21:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:34 2005 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 Wed Mar 17 03:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 18:08:34 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0001.htm From taj at www.linux.org.uk Wed Mar 17 04:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:34 2005 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 Wed Mar 17 05:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 18:08:34 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0001.htm From arundeep78 at yahoo.com Wed Mar 17 06:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Fri Jun 3 18:08:34 2005 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 Wed Mar 17 06:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 18:08:34 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0001.htm From dan at sync.ro Wed Mar 17 06:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Fri Jun 3 18:08:34 2005 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 Wed Mar 17 06:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:34 2005 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 Wed Mar 17 06:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:35 2005 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 07:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Fri Jun 3 18:08:35 2005 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 10:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Fri Jun 3 18:08:35 2005 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 13:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Fri Jun 3 18:08:35 2005 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 14:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:35 2005 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 12:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:35 2005 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 Thu Mar 18 06:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 18:08:35 2005 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://pixie.strangenoises.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0001.htm From taj at www.linux.org.uk Thu Mar 18 06:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:35 2005 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 07:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Fri Jun 3 18:08:35 2005 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 09:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:35 2005 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 15:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 18:08:35 2005 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 15:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:36 2005 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 17:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 18:08:36 2005 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 17:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:36 2005 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 17:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:36 2005 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 19:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 18:08:36 2005 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 20:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 18:08:36 2005 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 21:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 18:08:36 2005 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 Mon Mar 22 01:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 18:08:36 2005 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 Mon Mar 22 03:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:36 2005 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 Mon Mar 22 05:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Fri Jun 3 18:08:36 2005 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 Mon Mar 22 05:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:36 2005 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 Mon Mar 22 05:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:36 2005 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 mringwal at inf.ethz.ch Mon Mar 22 21:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Fri Jun 3 18:08:36 2005 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 22:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Fri Jun 3 18:08:36 2005 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 22:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj@www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 09:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 14:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 09:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj@www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0003.obj From taj at www.linux.org.uk Thu Mar 25 07:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 22:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 22:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 11:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 20:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj@www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 11:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 21:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 22:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 18:08:37 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 23:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj@www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj@www.linux.org.uk From dmarkman at mac.com Tue Mar 30 06:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj@www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj@www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj@www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 09:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 10:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 12:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 13:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 22:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0001.htm From minyal at nortelnetworks.com Tue Mar 30 22:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx@linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0001.htm From Daniel.Eisenhut at med.ge.com Tue Mar 30 22:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 23:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri Jun 3 18:08:38 2005 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut@med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040330/91be911f/attachment-0001.htm From taj at www.linux.org.uk Tue Mar 30 23:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:39 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj@www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx@linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 11:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Fri Jun 3 18:08:39 2005 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj@www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj@www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj@www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx@linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 12:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Fri Jun 3 18:08:39 2005 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 14:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:39 2005 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj@www.linux.org.uk From we_ve at web.de Wed Mar 31 19:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Fri Jun 3 18:08:39 2005 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 19:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:39 2005 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj@www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 18:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Fri Jun 3 18:08:39 2005 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 22:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:39 2005 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn@data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj@www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 19:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Fri Jun 3 18:08:39 2005 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn@data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0395.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0395.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0395.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0395.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-0395.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-0395.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-0395.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-0395.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0395.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0395.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0395.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0395.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0396.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0396.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0396.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0396.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-0396.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-0396.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-0396.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-0396.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0396.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0396.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0396.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0396.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0397.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0397.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0397.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0397.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-0397.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-0397.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-0397.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-0397.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0397.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0397.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0397.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0397.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0398.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0398.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0398.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0398.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-0398.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-0398.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-0398.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-0398.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0398.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0398.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0398.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0398.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0399.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0399.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0399.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0399.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-0399.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-0399.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-0399.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-0399.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0399.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0399.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0399.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0399.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0400.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0400.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0400.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0400.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-0400.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-0400.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-0400.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-0400.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0400.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0400.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0400.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0400.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0401.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0401.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0401.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0401.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-0401.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-0401.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-0401.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-0401.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0401.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0401.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0401.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0401.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0402.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0402.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0402.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0402.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-0402.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-0402.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-0402.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-0402.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0402.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0402.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0402.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0402.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0403.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0403.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0403.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0403.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-0403.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-0403.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-0403.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-0403.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0403.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0403.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0403.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0403.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0404.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0404.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0404.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-0404.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-0404.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-0404.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-0404.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-0404.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0404.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0404.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0404.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0404.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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.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.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.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.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.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0001.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0001.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0001.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-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, 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-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: 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-0001.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-0001.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-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: 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0001.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0001.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0001.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0001.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0002.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0002.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0002.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-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, 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-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: 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-0002.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-0002.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-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: 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0002.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0002.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0002.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0002.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0003.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0003.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0003.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0003.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0003.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0003.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0003.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0004.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0004.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0004.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0004.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0004.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0004.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0004.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0005.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0005.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0005.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0005.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0005.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0005.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0005.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0006.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0006.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0006.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0006.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0006.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0006.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0006.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0007.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0007.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0007.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0007.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0007.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0007.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0007.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0008.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0008.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0008.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0008.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0008.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0008.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0008.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0009.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0009.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0009.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0009.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0009.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0009.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0009.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0010.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0010.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0010.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0010.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0010.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0010.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0010.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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.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.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.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.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.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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0001.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0001.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0001.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-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, 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-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: 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-0001.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-0001.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-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: 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0001.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0001.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0001.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0001.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0002.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0002.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0002.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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-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, 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-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: 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-0002.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-0002.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-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: 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0002.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0002.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0002.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0002.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0003.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0003.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0003.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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 mringwal at inf.ethz.ch Mon Mar 22 14:35:52 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Mon, 22 Mar 2004 22:35:52 +0100 Subject: [Rxtx] packaging rxtx 2.0 Message-ID: hi one question: did anybody try to make an installer/package for linux, sparc, mac etc, that would use the 2.0 version and ALSO installs the comm.jar? how would you deal with the sun licensing? Can I download the sun binary license text from the web pag, show it to the user, ask for approval and go on downloading the file? I guess at feasible solution would be to make a an installer that let's the user download the sparc file into / and gets on. sorry for asking, but I could find much on the page and on the list. matthias ringwald From wrrhdev at riede.org Mon Mar 22 15:40:15 2004 From: wrrhdev at riede.org (Willem Riede) Date: Mon, 22 Mar 2004 17:40:15 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 22:15:03 -0500) References: Message-ID: <20040322224015.GW2088@serve.riede.org> On 2004.03.21 22:15, Trent Jarvi wrote: > > 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. IMHO, if 'make install' installs them, then so should the rpm... Note, that the spec file makes that happen, regardless of what gets installed. This way, the knowledge of what should be installed is wholly, and only, contained in the Makefile (mechanism shamelessly copied from other rpms). Regards, Willem Riede. From taj at www.linux.org.uk Mon Mar 22 15:48:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 22:48:03 +0000 (GMT) Subject: [Rxtx] packaging rxtx 2.0 In-Reply-To: Message-ID: On Mon, 22 Mar 2004, Matthias Ringwald wrote: > hi > > one question: did anybody try to make an installer/package for linux, > sparc, mac etc, > that would use the 2.0 version and ALSO installs the comm.jar? > > how would you deal with the sun licensing? > > Can I download the sun binary license text from the web pag, > show it to the user, ask for approval and go on downloading the file? > > I guess at feasible solution would be to make a an installer > that let's the user download the sparc file into / and gets on. > > sorry for asking, but I could find much on the page and on the list. > I'd rather not get involved in legal issues like that. It may well be possible. We are very careful to keep developers of rxtx out of such issues. I'm not a legal expert so it would be silly to give legal advice. There is another project called classpathx which is not confusing at all in this sense. They are implementing the comm.jar under LPGL compatible licenses as a cleanroom implementation. RXTX code is going to be put into the classpathx project so you can have both. http://www.gnu.org/software/classpathx/ This is how I've decided to answer your important question. The comm.jar is implemented. I need to cvs commit the rxtx code underneath. Classpathx has looked at the situation and so far consider the combination perfectly OK. I'd be glad to work with anyone interested in seeing it work. -- Trent Jarvi taj at www.linux.org.uk From mringwal at inf.ethz.ch Tue Mar 23 02:29:12 2004 From: mringwal at inf.ethz.ch (Matthias Ringwald) Date: Tue, 23 Mar 2004 10:29:12 +0100 Subject: [Rxtx] re.. packaging rxtx 2.0 In-Reply-To: References: Message-ID: <8BCB104D-7CAC-11D8-BA32-0003936CA678@inf.ethz.ch> hello On 22.03.2004, at 23:48, Trent Jarvi wrote: > On Mon, 22 Mar 2004, Matthias Ringwald wrote: > >> hi >> >> one question: did anybody try to make an installer/package for linux, >> sparc, mac etc, >> that would use the 2.0 version and ALSO installs the comm.jar? >> >> ... > > ... > There is another project called classpathx which is not confusing at > all > in this sense. They are implementing the comm.jar under LPGL > compatible > licenses as a cleanroom implementation. RXTX code is going to be put > into the classpathx project so you can have both. > > http://www.gnu.org/software/classpathx/ > > This is how I've decided to answer your important question. The > comm.jar > is implemented. I need to cvs commit the rxtx code underneath. > Classpathx has looked at the situation and so far consider the > combination > perfectly OK. > > I'd be glad to work with anyone interested in seeing it work. That's great news! Finally people could get a simple package installer for the os of their choice. In my case, I would like to create a Fink package for mac os x. Ok, when I find some spare time, I start setting up a package assuming there is a comm.jar it can use and see to get it working. If the classpathx version is ready, the current sun package can simple be exchanged and the package distributed. Regards, Matthias Ringwald From taj at www.linux.org.uk Tue Mar 23 07:23:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Mar 2004 14:23:41 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx Message-ID: ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz This was mentioned in earlier emails. I'd like to place a copy of rxtx 2.0 code into the classpathx project. Copyrights and licences for the rxtx code will not change. The 'comm.jar' will be Copyright by FSF. The license will be very much like rxtx's current license. There is a technical glitch HP pointed out some time ago with Java classes in the LGPL. That was worked out by using the FSF suggestion at the time. Since then they have come up with clearer language shown below. To answer the obvious question: linked packages will not be derivative works. I've included a copy of the GPL in the tar but read the license below thats in each source file before getting excited. I'm placing the cvs checkout up for ftp so people can try the jar. This is really early, but there is nothing wrong with having a look. It looks like a complete comm.jar written by Chris Burdess as a clean room implementation and donated to the FSF in the classpathx project http://www.gnu.org/software/classpathx/. The rxtx project will not vanish after this but classpathx looks like a good project. I've joined the classpathx devel team and will help with issues there too. Other rxtx developers are welcome to join classpathx too if they are interested. Support for Sun's comm.jar will still be here as will the rxtx 2.1 package. We will probably drop into the kaffe project too if they like. The following is the short form of the license with the important last clause: /* * SerialPort.java * Copyright (C) 2004 The Free Software Foundation * * This file is part of GNU CommAPI, a library. * * GNU CommAPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU CommAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. */ package javax.comm; Feel free to discuss this proposal here. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 24 02:35:38 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Mar 2004 09:35:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX for Windows CE (fwd) Message-ID: A small fix for iPAQs. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- I downloaded the api("RXTX_iPAQ_0211.zip" on "http://republika.pl/mho/java/comm/") to open a serial port on an iPAQ with PocketPC 2002 to communicate with the bluetooth device. But when I send some data with outStream.write(...) and then outStream.flush() it prints out the follwing error message: java.lang.UnsatisfiedLinkError: nativeDrain at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(Bytecode 47) at OpenPort.reset..... I did everthing that is written the INSTALL.txt. Have you any idea why it doesn't work and what I could do? For any help I would be very thankful... ---- Yes, there is an issue caused by changes between native part (which was done by myself) and Java part (which is regular rxtx). I've attached updates for that. I didn't have time to commit them - I'm extremely busy now. Sorry for that. Cheers, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: gnu_io_RXTXPort.cpp Type: application/octet-stream Size: 49572 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040324/18608e58/gnu_io_RXTXPort-0003.obj From taj at www.linux.org.uk Thu Mar 25 00:22:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 25 Mar 2004 07:22:22 +0000 (GMT) Subject: [Rxtx] Proposal for adding rxtx to classpathx In-Reply-To: Message-ID: Sounds like there isnt anyone against the proposal. This weekend I'll be following through with bringing classpathx and rxtx together. One of the first things that will happen is rxtx will be run though indent to match the GNU coding convention. If you have any changes you would like to merge, it would be best to try to get them in before this weekend. If you are running parallel code bases, you may want to run your tree through indent with default options. On Tue, 23 Mar 2004, Trent Jarvi wrote: > > ftp://www.qbang.org/pub/rxtx/classpathx-comm.tar.gz > > This was mentioned in earlier emails. I'd like to place a copy of rxtx > 2.0 code into the classpathx project. Copyrights and licences for the > rxtx code will not change. > > The 'comm.jar' will be Copyright by FSF. The license will be very much > like rxtx's current license. There is a technical glitch HP pointed out > some time ago with Java classes in the LGPL. That was worked out by using > the FSF suggestion at the time. Since then they have come up with clearer > language shown below. To answer the obvious question: linked packages > will not be derivative works. I've included a copy of the GPL in the tar > but read the license below thats in each source file before getting > excited. > > I'm placing the cvs checkout up for ftp so people can try the jar. This > is really early, but there is nothing wrong with having a look. It looks > like a complete comm.jar written by Chris Burdess as a clean room > implementation and donated to the FSF in the classpathx project > http://www.gnu.org/software/classpathx/. > > The rxtx project will not vanish after this but classpathx looks like a > good project. I've joined the classpathx devel team and will help with > issues there too. Other rxtx developers are welcome to join classpathx > too if they are interested. Support for Sun's comm.jar will still be here > as will the rxtx 2.1 package. We will probably drop into the kaffe > project too if they like. > > The following is the short form of the license with the important last > clause: > > /* > * SerialPort.java > * Copyright (C) 2004 The Free Software Foundation > * > * This file is part of GNU CommAPI, a library. > * > * GNU CommAPI is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * GNU CommAPI is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > USA > * > * As a special exception, if you link this library with other files to > * produce an executable, this library does not by itself cause the > * resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why the > * executable file might be covered by the GNU General Public License. > */ > package javax.comm; > > Feel free to discuss this proposal here. > > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Sun Mar 28 14:03:56 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Sun, 28 Mar 2004 22:03:56 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Hi everyone, I've played around with Java Comms API on Windows XP and developed an application to communicate with a GPS receiver attached to the serial port. I now want to port this to an IPAQ running Familiar Linux. Has anyone already ported the Java Comms API to this platform? If not, do I just follow the porting instructions? I have the Blackdown 1.3.1 JRE on my IPAQ but no compiler at present. Regards, Sean From taj at www.linux.org.uk Sun Mar 28 14:12:09 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 28 Mar 2004 22:12:09 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E0738@atlanta.unn.ac.uk> Message-ID: On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 03:03:49 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 11:03:49 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Trent, So I just need to install and compiler and pay attention and correct the errors? Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 28 March 2004 22:12 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar On Sun, 28 Mar 2004, sean.barry wrote: > Hi everyone, > > I've played around with Java Comms API on Windows XP and developed an > application to communicate with a GPS receiver attached to the serial port. > I now want to port this to an IPAQ running Familiar Linux. Has anyone > already ported the Java Comms API to this platform? > If not, do I just follow the porting instructions? I have the Blackdown > 1.3.1 JRE on my IPAQ but no compiler at present. > Hi Saen I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps you will need to pay attention to the port names. Please let us know how it goes. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 12:01:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 20:01:18 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073A@atlanta.unn.ac.uk> Message-ID: I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk From carsten.ringe at web.de Mon Mar 29 03:26:59 2004 From: carsten.ringe at web.de (Carsten Ringe) Date: Mon, 29 Mar 2004 12:26:59 +0200 Subject: [Rxtx] Problems with lock files Message-ID: <20040329102659.GA30586@naupaum> Hi guys! I installed RXTX a few days ago, trying to get a portlist on my Linux Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try to start a test program which get a list of available ports, but it never comes to that. This is my error: Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 check_group_uucp(): error testing lock file creation Error details: No such file or directory check_lock_status: No permission to create lock file. I'm in group uucp and I'm able to write into /var/lock/ as normal user. I don't want to start my app as root. Can you help me? Maybe there is a problem with the debian directory structure? Is it really /var/lock/* where rxtx wants to write lock files? thanks, Carsten -- Carsten Ringe Hauptstrasse 9 31812 Bad Pyrmont GPG fingerprint: F49F 87EC 1BD5 B3D2 B222 C3F2 2383 C92B A76F 5869 From taj at www.linux.org.uk Mon Mar 29 13:22:32 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 21:22:32 +0100 (BST) Subject: [Rxtx] Problems with lock files In-Reply-To: <20040329102659.GA30586@naupaum> Message-ID: On Mon, 29 Mar 2004, Carsten Ringe wrote: > Hi guys! > > I installed RXTX a few days ago, trying to get a portlist on my Linux > Debian box. I downloaded the -2.1-7pre16 package and compiled it. I try > to start a test program which get a list of available ports, but it > never comes to that. This is my error: > > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > check_group_uucp(): error testing lock file > creation Error details: No such file or directory > check_lock_status: No permission to create lock file. > > I'm in group uucp and I'm able to write into /var/lock/ as normal user. > I don't want to start my app as root. Can you help me? Maybe there is a > problem with the debian directory structure? Is it really /var/lock/* > where rxtx wants to write lock files? > Hi Cartsen The only thing I can think of is that somehow the following code from SerialImp.h is being missed. #if defined(__linux__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __linux__ */ I asked some debian users and the directory is rw by all. drwxrwxrwt 3 root root 4096 Jan 15 12:01 /var/lock/ You might try taking the ifdef condition out above and just force those defines. -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Mon Mar 29 14:30:30 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Mon, 29 Mar 2004 22:30:30 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Trent, I'll make sure I read the install guide but for do I just take the Mac/OS X source and compile that? Sorry for all the questions. Regards, Sean -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 29 March 2004 20:01 To: Java RXTX discussion Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar I dont expect any errors. I've not used Familiar linux so there could be something that was not expected. Be sure to read about lockfiles in INSTALL. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > So I just need to install and compiler and pay attention and correct the > errors? > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 28 March 2004 22:12 > To: Java RXTX discussion > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > Hi everyone, > > > > I've played around with Java Comms API on Windows XP and developed an > > application to communicate with a GPS receiver attached to the serial > port. > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > already ported the Java Comms API to this platform? > > If not, do I just follow the porting instructions? I have the Blackdown > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > Hi Saen > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > you will need to pay attention to the port names. Please let us know how > it goes. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From taj at www.linux.org.uk Mon Mar 29 15:22:34 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 29 Mar 2004 23:22:34 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073B@atlanta.unn.ac.uk> Message-ID: The Mac OS X binaries are in with the source. I'd be willing to give Dmitry an account so he could do a seperate package on rxtx.org but its worked well so far as is. All OS's use the same source. If you like the Sun option of combining their comm.jar with rxtx use: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz If you have the source to what you are trying to use and want one package but in namespace gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz I'm also trying to put things together for classpathx which is like the first option but you will be able to download one tarball. http://www.gnu.org/software/classpathx/ Its still a bit early though. On Mon, 29 Mar 2004, sean.barry wrote: > Trent, > > I'll make sure I read the install guide but for do I just take the Mac/OS X > source and compile that? Sorry for all the questions. > > Regards, > > Sean > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: 29 March 2004 20:01 > To: Java RXTX discussion > Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > I dont expect any errors. I've not used Familiar linux so there could be > something that was not expected. Be sure to read about lockfiles in > INSTALL. > > On Mon, 29 Mar 2004, sean.barry wrote: > > > Trent, > > > > So I just need to install and compiler and pay attention and correct the > > errors? > > > > Regards, > > > > Sean > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: 28 March 2004 22:12 > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > > > > > > On Sun, 28 Mar 2004, sean.barry wrote: > > > > > Hi everyone, > > > > > > I've played around with Java Comms API on Windows XP and developed an > > > application to communicate with a GPS receiver attached to the serial > > port. > > > I now want to port this to an IPAQ running Familiar Linux. Has anyone > > > already ported the Java Comms API to this platform? > > > If not, do I just follow the porting instructions? I have the Blackdown > > > 1.3.1 JRE on my IPAQ but no compiler at present. > > > > > > > Hi Saen > > > > I think rxtx will compile for the IPAQ with Familiar Linux as is. Perhaps > > > you will need to pay attention to the port names. Please let us know how > > it goes. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Mon Mar 29 22:30:19 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 30 Mar 2004 00:30:19 -0500 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: References: Message-ID: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> 1. to build mac os x jnilib and jar file you have to have ProjectBuilder/XCode or CodeWarrior every Macintosh developer should install Apple's developer tools without those tools you won't be able to build rxtx lib anyway, because default MAC oS X distribution doesn't have gcc compiler 2. besides rxtx distribution has CodeWarrior project as well so you can build library and jar file with CW (you have to install developer tools even in that case) 3. RXTX distribution contain Mac OS X installer that will set up uucp group and appropriate permissions for you it is possible to create make file to build mac os x files if you're interesting in that I can try to find in my archive appropriate command line(s) On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > The Mac OS X binaries are in with the source. I'd be willing to give > Dmitry an account so he could do a seperate package on rxtx.org but its > worked well so far as is. > > All OS's use the same source. > > > If you like the Sun option of combining their comm.jar with rxtx use: > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > If you have the source to what you are trying to use and want one > package > but in namespace gnu.io: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > I'm also trying to put things together for classpathx which is like the > first option but you will be able to download one tarball. > > http://www.gnu.org/software/classpathx/ > > Its still a bit early though. > > On Mon, 29 Mar 2004, sean.barry wrote: > >> Trent, >> >> I'll make sure I read the install guide but for do I just take the >> Mac/OS X >> source and compile that? Sorry for all the questions. >> >> Regards, >> >> Sean >> >> -----Original Message----- >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >> Sent: 29 March 2004 20:01 >> To: Java RXTX discussion >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar >> >> >> >> I dont expect any errors. I've not used Familiar linux so there >> could be >> something that was not expected. Be sure to read about lockfiles in >> INSTALL. >> >> On Mon, 29 Mar 2004, sean.barry wrote: >> >>> Trent, >>> >>> So I just need to install and compiler and pay attention and correct >>> the >>> errors? >>> >>> Regards, >>> >>> Sean >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] >>> Sent: 28 March 2004 22:12 >>> To: Java RXTX discussion >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar >>> >>> >>> On Sun, 28 Mar 2004, sean.barry wrote: >>> >>>> Hi everyone, >>>> >>>> I've played around with Java Comms API on Windows XP and developed >>>> an >>>> application to communicate with a GPS receiver attached to the >>>> serial >>> port. >>>> I now want to port this to an IPAQ running Familiar Linux. Has >>>> anyone >>>> already ported the Java Comms API to this platform? >>>> If not, do I just follow the porting instructions? I have the >>>> Blackdown >>>> 1.3.1 JRE on my IPAQ but no compiler at present. >>>> >>> >>> Hi Saen >>> >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. >>> Perhaps >> >>> you will need to pay attention to the port names. Please let us >>> know how >>> it goes. >>> >>> -- >>> Trent Jarvi >>> taj at www.linux.org.uk >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at linuxgrrls.org >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >>> >>> >> >> > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From we_ve at web.de Tue Mar 30 01:00:24 2004 From: we_ve at web.de (Werner vom Eyser) Date: Tue, 30 Mar 2004 10:00:24 +0200 Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) Message-ID: Hello, I built librxtxSerial.jnilib and jcl.jar from the RXTX version rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. By running the BlackBox example from Sun's commapi package I got the following error message: wve% java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Do you have any idea how to solve the problem? Thank you for your help. Sincerely Werner From sean.barry at unn.ac.uk Tue Mar 30 02:48:05 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Tue, 30 Mar 2004 10:48:05 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Trent, Not to worry I've got a fair bit of computing experience. I think I have to modify the source code as mentioned for the port names but I also have to recompile the shared objects for my IPAQ platform. Do you have a script for creating the shared objects? Regards, Sean From taj at www.linux.org.uk Tue Mar 30 04:31:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 12:31:08 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <518AAA861379D411B4E900508BCF7B74031E073F@atlanta.unn.ac.uk> Message-ID: Hi sean I dont have a script for building but there is a README.IPAQ that Thomas O'Connell put together. It should be with the source. On Tue, 30 Mar 2004, sean.barry wrote: > Trent, > > Not to worry I've got a fair bit of computing experience. I think I have to > modify the source code as mentioned for the port names but I also have to > recompile the shared objects for my IPAQ platform. Do you have a script for > creating the shared objects? > > Regards, > > Sean > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 30 05:55:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 13:55:39 +0100 (BST) Subject: [Rxtx] Error: Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver (Mac OS X 10.3) In-Reply-To: Message-ID: On Tue, 30 Mar 2004, Werner vom Eyser wrote: > Hello, > > I built librxtxSerial.jnilib and jcl.jar from the RXTX version > rxtx-2.0-7pre1 for Mac OS X 10.3 and put it in /Library/Java/Extension. > By running the BlackBox example from Sun's commapi package I got the > following error message: > wve% java BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no > SolarisSerialParallel in java.library.path > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > No serial ports found! > > Do you have any idea how to solve the problem? > Thank you for your help. > The javax.comm.properties file was not found. Sun documents this but essentially it should contain a single line: Driver=gnu.io.RXTXCommDriver in .../java/jre/lib/javax.comm.properties -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Tue Mar 30 14:25:58 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:25:58 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316F8C@zrc2c000.us.nortel.com> Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/c2b1a7fc/attachment-0003.html From minyal at nortelnetworks.com Tue Mar 30 14:29:46 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 15:29:46 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF05316FB8@zrc2c000.us.nortel.com> btw, i used minicom to verify /dev/ttyQ1a1 is working fine. LMY -----Original Message----- From: Liang, Minya [NGC:PV32:EXCH] Sent: Tuesday, March 30, 2004 3:26 PM To: 'rxtx at linuxgrrls.org' Subject: [Rxtx] Can't override serial port names on Linux Hi, I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access ports other than /dev/ttyS0 and ttyS1. the port that i try to access is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still RXTX complains port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. Here's the command and the error (i'm using the BlackBox.java sample program from Sun): java -cp $CLASSPATH -Dgnu.io.rxtx.SerialPorts=/dev/ttyQ1a1 BlackBox -p /dev/ttyQ1a1 Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Port /dev/ttyQ1a1 not found! No ports found1 can someone point out what's wrong? thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040330/3510610c/attachment-0003.html From Daniel.Eisenhut at med.ge.com Tue Mar 30 14:33:57 2004 From: Daniel.Eisenhut at med.ge.com (Eisenhut, Daniel (MED)) Date: Tue, 30 Mar 2004 15:33:57 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <77FE4A1FA59FF947845A42194AD667627731E9@uswaumsx07medge.med.ge.com> > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to > access ports other than /dev/ttyS0 and ttyS1. > the port that i try to access is /dev/ttyQ1a1. I passed > -Dgnu.io.rxtx.SerialPorts to JVM, but still > RXTX complains > port is not valid, and keeps printing out /dev/ttyS0 and ttyS1. > Here's the command and the error (i'm using the BlackBox.java > sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan From minyal at nortelnetworks.com Tue Mar 30 15:18:54 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue, 30 Mar 2004 16:18:54 -0600 Subject: [Rxtx] Can't override serial port names on Linux Message-ID: <870397D7C140C84DB081B88396458DAF0531718D@zrc2c000.us.nortel.com> i went through the code and it seems that the property name is changed to javax.comm.rxtx.SerialPorts instead. i was able to override the port name this way. thanks, LMY -----Original Message----- From: Eisenhut, Daniel (MED) [mailto:Daniel.Eisenhut at med.ge.com] Sent: Tuesday, March 30, 2004 3:34 PM To: 'Java RXTX discussion' Subject: RE: [Rxtx] Can't override serial port names on Linux > I'm running RXTX2.0.7pre1 on RH7.3, Java 1.4.2_04, and need to access > ports other than /dev/ttyS0 and ttyS1. the port that i try to access > is /dev/ttyQ1a1. I passed -Dgnu.io.rxtx.SerialPorts to JVM, but still > > RXTX complains port is not valid, and keeps printing out /dev/ttyS0 > and ttyS1. Here's the command and the error (i'm using the > BlackBox.java sample program from Sun): I just dealt with this one earlier this morning. In the file, javax.comm.properties, I had to add a blank line after the "Driver=gnu.io.RXTXCommDriver" entry. It wasn't reading the gnu.io.rxtx.properties files or any -Dgnu.io.rxtx.SerialPorts entries because the RXTXCommDriver wasn't being loaded. Dan _______________________________________________ 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/20040330/91be911f/attachment-0003.html From taj at www.linux.org.uk Tue Mar 30 15:51:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 30 Mar 2004 23:51:13 +0100 (BST) Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar In-Reply-To: <55303B96-820B-11D8-8841-000A95DA5E9C@mac.com> Message-ID: I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From sean.barry at unn.ac.uk Wed Mar 31 03:10:47 2004 From: sean.barry at unn.ac.uk (sean.barry) Date: Wed, 31 Mar 2004 11:10:47 +0100 Subject: [Rxtx] Java Comms API on Linux IPAQ running Familiar Message-ID: <518AAA861379D411B4E900508BCF7B74031E0740@atlanta.unn.ac.uk> Thanks Trent I'll try this. -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: 30 March 2004 23:51 To: Java RXTX discussion Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar I forgot we had this. armv4l-unknown-linux-gnu It is an old version of rxtx but may still be of use: ftp://www.qbang.org/pub/rxtx/rxtx-bins.1.tar.gz Its in the 1.4 directory. It works with Sun's comm.jar. On Tue, 30 Mar 2004, Dmitry Markman wrote: > 1. to build mac os x jnilib and jar file you have to have > ProjectBuilder/XCode or CodeWarrior > > every Macintosh developer should install Apple's developer tools > without those tools you won't be able to build rxtx lib anyway, because > default MAC oS X distribution doesn't have gcc compiler > > 2. besides rxtx distribution has CodeWarrior project as well so you can > build > library and jar file with CW (you have to install developer tools even > in that case) > > 3. RXTX distribution contain Mac OS X installer that will set up > uucp group and appropriate permissions for you > > it is possible to create make file to build mac os x files > if you're interesting in that I can try to find in my archive > appropriate command line(s) > > > > > > > On Mar 29, 2004, at 5:22 PM, Trent Jarvi wrote: > > > > > The Mac OS X binaries are in with the source. I'd be willing to give > > Dmitry an account so he could do a seperate package on rxtx.org but its > > worked well so far as is. > > > > All OS's use the same source. > > > > > > If you like the Sun option of combining their comm.jar with rxtx use: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > > > If you have the source to what you are trying to use and want one > > package > > but in namespace gnu.io: > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > I'm also trying to put things together for classpathx which is like the > > first option but you will be able to download one tarball. > > > > http://www.gnu.org/software/classpathx/ > > > > Its still a bit early though. > > > > On Mon, 29 Mar 2004, sean.barry wrote: > > > >> Trent, > >> > >> I'll make sure I read the install guide but for do I just take the > >> Mac/OS X > >> source and compile that? Sorry for all the questions. > >> > >> Regards, > >> > >> Sean > >> > >> -----Original Message----- > >> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >> Sent: 29 March 2004 20:01 > >> To: Java RXTX discussion > >> Subject: RE: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >> > >> > >> > >> I dont expect any errors. I've not used Familiar linux so there > >> could be > >> something that was not expected. Be sure to read about lockfiles in > >> INSTALL. > >> > >> On Mon, 29 Mar 2004, sean.barry wrote: > >> > >>> Trent, > >>> > >>> So I just need to install and compiler and pay attention and correct > >>> the > >>> errors? > >>> > >>> Regards, > >>> > >>> Sean > >>> > >>> -----Original Message----- > >>> From: Trent Jarvi [mailto:taj at www.linux.org.uk] > >>> Sent: 28 March 2004 22:12 > >>> To: Java RXTX discussion > >>> Subject: Re: [Rxtx] Java Comms API on Linux IPAQ running Familiar > >>> > >>> > >>> On Sun, 28 Mar 2004, sean.barry wrote: > >>> > >>>> Hi everyone, > >>>> > >>>> I've played around with Java Comms API on Windows XP and developed > >>>> an > >>>> application to communicate with a GPS receiver attached to the > >>>> serial > >>> port. > >>>> I now want to port this to an IPAQ running Familiar Linux. Has > >>>> anyone > >>>> already ported the Java Comms API to this platform? > >>>> If not, do I just follow the porting instructions? I have the > >>>> Blackdown > >>>> 1.3.1 JRE on my IPAQ but no compiler at present. > >>>> > >>> > >>> Hi Saen > >>> > >>> I think rxtx will compile for the IPAQ with Familiar Linux as is. > >>> Perhaps > >> > >>> you will need to pay attention to the port names. Please let us > >>> know how > >>> it goes. > >>> > >>> -- > >>> Trent Jarvi > >>> taj at www.linux.org.uk > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at linuxgrrls.org > >>> http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > >>> > >>> > >> > >> > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- This message has been scanned for viruses and dangerous content by the NorMAN MailScanner Service and is believed to be clean. The NorMAN MailScanner Service is operated by Information, Systems and Services, University of Newcastle upon Tyne. From we_ve at web.de Wed Mar 31 04:57:17 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 13:57:17 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) Message-ID: Hello, I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate folder (/library/java/extensions). With java -verbose BlackBox I got the following error message: Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver gnu.io.RXTXCommDriver Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while loading driver com.sun.comm.SolarisDriver [Loaded javax.comm.CommPortEnumerator] No serial ports found! The system found the gnu.io package but no implementation for the CommPortIdentifier class. Do you have any idea to solve the problem. Thank you for your help. Sincerely Werner From taj at www.linux.org.uk Wed Mar 31 06:10:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 14:10:27 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Hello, > > I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > folder (/library/java/extensions). > > With java -verbose BlackBox > I got the following error message: > > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver gnu.io.RXTXCommDriver > Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > loading driver com.sun.comm.SolarisDriver > [Loaded javax.comm.CommPortEnumerator] > No serial ports found! > > > The system found the gnu.io package but no implementation for the > CommPortIdentifier class. > > Do you have any idea to solve the problem. > Thank you for your help. > Hmm. I thought we could use / or . but the above appears to be causing problems. I see it was changed by me since the last version via scripts. The attached patch will revert to just using / javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using javax/comm/CommPortIdentifier as we did in the past. to patch: cd rxtx-version/src patch -p1 < namespace.patch -- Trent Jarvi taj at www.linux.org.uk From we_ve at web.de Wed Mar 31 11:05:03 2004 From: we_ve at web.de (Werner vom Eyser) Date: Wed, 31 Mar 2004 20:05:03 +0200 Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > >> Hello, >> >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate >> folder (/library/java/extensions). >> >> With java -verbose BlackBox >> I got the following error message: >> >> Devel Library >> ========================================= >> Native lib Version = RXTX-2.0-7pre1 >> Java lib Version = RXTX-2.0-7pre1 >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver gnu.io.RXTXCommDriver >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while >> loading driver com.sun.comm.SolarisDriver >> [Loaded javax.comm.CommPortEnumerator] >> No serial ports found! >> >> >> The system found the gnu.io package but no implementation for the >> CommPortIdentifier class. >> >> Do you have any idea to solve the problem. >> Thank you for your help. >> > > > Hmm. I thought we could use / or . but the above appears to be causing > problems. I see it was changed by me since the last version via scripts. > The attached patch will revert to just using / > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > javax/comm/CommPortIdentifier as we did in the past. > > to patch: > > cd rxtx-version/src > patch -p1 < namespace.patch > Hello, Sorry for asking again. But I don't understand what you mean with "patch -p1 < namespace.patch" I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. Could you give me any other hints? Thank you very much for your help! Regards, Werner From taj at www.linux.org.uk Wed Mar 31 11:24:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 19:24:28 +0100 (BST) Subject: [Rxtx] java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier (RXTX for Mac OS X 10.3) In-Reply-To: Message-ID: On Wed, 31 Mar 2004, Werner vom Eyser wrote: > Am 31.03.2004 15:10 Uhr schrieb "Trent Jarvi" unter : > > > > > On Wed, 31 Mar 2004, Werner vom Eyser wrote: > > > >> Hello, > >> > >> I used the RXTX-2.0-7pre1 version for use with Sun's CommAPI (namespace > >> javax.comm). I put jcl.jar and librxtxSerial.jnilib in the appropriate > >> folder (/library/java/extensions). > >> > >> With java -verbose BlackBox > >> I got the following error message: > >> > >> Devel Library > >> ========================================= > >> Native lib Version = RXTX-2.0-7pre1 > >> Java lib Version = RXTX-2.0-7pre1 > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver gnu.io.RXTXCommDriver > >> Caught java.lang.NoClassDefFoundError: javax.comm/CommPortIdentifier while > >> loading driver com.sun.comm.SolarisDriver > >> [Loaded javax.comm.CommPortEnumerator] > >> No serial ports found! > >> > >> > >> The system found the gnu.io package but no implementation for the > >> CommPortIdentifier class. > >> > >> Do you have any idea to solve the problem. > >> Thank you for your help. > >> > > > > > > Hmm. I thought we could use / or . but the above appears to be causing > > problems. I see it was changed by me since the last version via scripts. > > The attached patch will revert to just using / > > > > javax.comm/CommPortIdentifier is in Sun's comm.jar lets try using > > javax/comm/CommPortIdentifier as we did in the past. > > > > to patch: > > > > cd rxtx-version/src > > patch -p1 < namespace.patch > > > Hello, > > Sorry for asking again. But I don't understand what you mean with > "patch -p1 < namespace.patch" > I don't find any file named namespace.patch in RXTX-2.0-7pre1 folder. > Could you give me any other hints? > Thank you very much for your help! > It looks like I failed to attach the patch. I've attached it to this email. You can save it in the src directory and use it with the patch command above vi a shell. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- diff -ur src/SerialImp.c newsrc/SerialImp.c --- src/SerialImp.c 2004-02-20 11:24:31.000000000 -0700 +++ newsrc/SerialImp.c 2004-03-31 05:33:09.000000000 -0700 @@ -4328,12 +4328,12 @@ } else { jclass cls; /* dima */ jmethodID mid; /* dima */ - cls = (*env)->FindClass(env,"javax.comm/CommPortIdentifier" ); /* dima */ + cls = (*env)->FindClass(env,"javax/comm/CommPortIdentifier" ); /* dima */ if (cls == 0) { /* dima */ - report( "can't find class of javax.comm/CommPortIdentifier\n" ); /* dima */ + report( "can't find class of javax/comm/CommPortIdentifier\n" ); /* dima */ return numPorts; /* dima */ } /* dima */ - mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax.comm/CommDriver;)V" ); /* dima */ + mid = (*env)->GetStaticMethodID(env, cls, "addPortName", "(Ljava/lang/String;ILjavax/comm/CommDriver;)V" ); /* dima */ if (mid == 0) { printf( "getMethodID of CommDriver.addPortName failed\n" ); diff -ur src/SerialImp.h newsrc/SerialImp.h --- src/SerialImp.h 2003-10-17 05:01:11.000000000 -0600 +++ newsrc/SerialImp.h 2004-03-31 05:33:41.000000000 -0700 @@ -364,7 +364,7 @@ #define ARRAY_INDEX_OUT_OF_BOUNDS "java/lang/ArrayIndexOutOfBoundsException" #define OUT_OF_MEMORY "java/lang/OutOfMemoryError" #define IO_EXCEPTION "java/io/IOException" -#define PORT_IN_USE_EXCEPTION "javax.comm/PortInUseException" +#define PORT_IN_USE_EXCEPTION "javax/comm/PortInUseException" /* some popular releases of Slackware do not have SSIZE_MAX */ From lu6fwn at data54.com Wed Mar 31 10:22:13 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 17:22:13 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? Message-ID: When I try to connect the application, I receive the following warning messages XTX WARNING: This library requires the user running applications to be in group uucp. Please consult the INSTALL documentation. More information is avaiable under the topic 'How can I use Lock Files with rxtx?' check_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL If anybody has an answer, please ........... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From taj at www.linux.org.uk Wed Mar 31 14:00:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 31 Mar 2004 22:00:27 +0100 (BST) Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > When I try to connect the application, I receive the > following warning messages > > XTX WARNING: This library requires the user running > applications to be in > group uucp. Please consult the INSTALL documentation. > More information is > avaiable under the topic 'How can I use Lock Files with > rxtx?' > check_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > If anybody has an answer, please ........... > Here is the documentation. As you can see, the distributions have not agreed on a standard so you may have to look around a little to see what they do. The goal is to give the user write permision in the lock directory by adding them to the correct group. T. How can I use Lock Files with rxtx? Redhat users. Note that Redhat changed group uucp to group lock with Redhat 7.2. Mandrake users. Note that /var/lock needs to be group uucp for this to work. Mac OS X users. Note that you may need to create the lock directory with group uucp ownership. RXTX uses lock files by default. configure --disable-lockfiles to generate rxtx libraries without lock files. Its strongly recommended that you do use lock files to prevent rxtx from stomping on other programs using serial ports. Lock files are used to prevent more than one program accessing a port at a time. Lock files require a bit of sysadmin to work properly.. Rxtx has support for lock files on Linux only. It may work on other platforms but read the source before blindly trying it. Before you use lock files you need to do one of two things: 1. Be the root or uucp user on your machine whenever you use rxtx 2. add the specific user that needs to use rxtx to the group uucp. (preferred) To add a user to the uucp group edit /etc/group as root and change the following: uucp::14:uucp to something like: uucp::14:uucp,jarvi In this case jarvi is the login name for the user that needs to use lock files. Do not change the number (14). Whatever is in your group file is correct. User jarvi in this case can now use rxtx with lock files. The lock file code does not support kermit style lock files or lock files in /var/spool. Its sure to fail if you're using subdirectories in /dev or do not have /dev. Still cant get things to run under a root account? Vadim Tkachenko writes: "Maybe you remember - couple of months back I've run into inability to run the JDK 1.3+ from under root account. Today, absolutely suddenly, something clicked in my head and the cause was found: libsafe. To make JDK work, it is enough to disable libsafe (unset LD_PRELOAD)." As another option it is possible to use a Lock File Server. In this case, a server runs in group uucp or lock and rxtx then connects to localhost to lock and unlock the port. The server and install instructions can be found in src/lfd. RXTX will need to be configured to use the server: configure --enable-lockfile_server Any user can then lock the ports if they are not already locked. -- Trent Jarvi taj at www.linux.org.uk From lu6fwn at data54.com Wed Mar 31 11:01:30 2004 From: lu6fwn at data54.com (lu6fwn@data54.com) Date: Wed, 31 Mar 2004 18:01:30 +0000 Subject: [Rxtx] "How can I use Lock Files with rxtx ? In-Reply-To: Message-ID: On Wed, 31 Mar 2004 22:00:27 +0100 (BST) Trent Jarvi wrote: > On Wed, 31 Mar 2004 lu6fwn at data54.com wrote: > > > > > When I try to connect the application, I receive the > > following warning messages > > > > XTX WARNING: This library requires the user running > > applications to be in > > group uucp. Please consult the INSTALL documentation. > > More information is > > avaiable under the topic 'How can I use Lock Files with > > rxtx?' > > check_lock_status: No permission to create lock file. > > > > please see: How can I use Lock Files with rxtx? in > INSTALL > > > > > > If anybody has an answer, please ........... > > > > Here is the documentation. As you can see, the > distributions have not > agreed on a standard so you may have to look around a > little to see what > they do. The goal is to give the user write permision in > the lock > directory by adding them to the correct group. > > T. How can I use Lock Files with rxtx? > > Redhat users. Note that Redhat changed group uucp to > group lock with > Redhat > 7.2. > > Mandrake users. Note that /var/lock needs to be group > uucp for this to > work. > > Mac OS X users. Note that you may need to create the > lock directory with > group uucp ownership. > > RXTX uses lock files by default. configure > --disable-lockfiles to > generate > rxtx libraries without lock files. Its strongly > recommended that you do > use lock files to prevent rxtx from stomping on other > programs using > serial > ports. > > Lock files are used to prevent more than one program > accessing a port at a > time. Lock files require a bit of sysadmin to work > properly.. > > Rxtx has support for lock files on Linux only. It may > work on other > platforms but read the source before blindly trying it. > > Before you use lock files you need to do one of two > things: > > 1. Be the root or uucp user on your machine > whenever you use rxtx > 2. add the specific user that needs to use rxtx > to the group > uucp. > (preferred) > > To add a user to the uucp group edit /etc/group as root > and change the > following: > uucp::14:uucp > to something like: > uucp::14:uucp,jarvi > In this case jarvi is the login name for the user that > needs to use lock > files. > Do not change the number (14). Whatever is in your group > file is correct. > > User jarvi in this case can now use rxtx with lock files. > > The lock file code does not support kermit style lock > files or lock files > in > /var/spool. Its sure to fail if you're using > subdirectories in /dev or do > not > have /dev. > > Still cant get things to run under a root > account? > > Vadim Tkachenko writes: > > "Maybe you remember - couple of months back I've > run into > inability to > run the JDK 1.3+ from under root account. > > Today, absolutely suddenly, something clicked in > my head and the > cause > was found: libsafe. To make JDK work, it is > enough to disable > libsafe > (unset LD_PRELOAD)." > > As another option it is possible to use a Lock File > Server. In this case, > a server runs in group uucp or lock and rxtx then > connects to localhost > to lock and unlock the port. The server and install > instructions can be > found in src/lfd. RXTX will need to be configured to use > the server: > > configure --enable-lockfile_server > > Any user can then lock the ports if they are not already > locked. > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx Dear Trent Jarvi..... thank you, I wait you to be useful at some time ......... Sls. Hg. --------------------------------------------------------------------------------------- Sac?u cuenta de e-mail gratis en http://www.data54.com y pas? ser parte de nuestra comunidad From minyal at nortelnetworks.com Mon Mar 1 08:52:05 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Mon, 1 Mar 2004 09:52:05 -0600 Subject: [Rxtx] about non-blicking io Message-ID: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> i think Adrian is talking about something similar to the NIO feature new in Java 1.4, stuff such as channels and selectors etc, instead of just inputstream and outputstream. LMY -----Original Message----- From: Trent Jarvi [mailto:taj at www.linux.org.uk] Sent: Saturday, February 28, 2004 10:09 AM To: Java RXTX discussion Subject: Re: [Rxtx] about non-blicking io On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- 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/20040301/6cbe9a25/attachment-0004.html From taj at www.linux.org.uk Mon Mar 1 09:50:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 1 Mar 2004 16:50:08 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <870397D7C140C84DB081B88396458DAF0492B458@zrc2c000.us.nortel.com> Message-ID: Hmm http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this right, its selecting on a set of file descriptors so the thread count can stay low. RXTX currently selects in an event loop for each port. nbio is not currently in rxtx. But I see Matt Welsh has released a library licensed under a BSD license which could be used to do this: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ I'm not sure this is a problem in rxtx. Keeping thread counts low is always a good thing but I have a hard time picturing the current implementation running into bottlenecks. I'm curious if Adrian has run into a problem. On Mon, 1 Mar 2004, Minya Liang wrote: > i think Adrian is talking about something similar to the NIO feature new in > Java 1.4, stuff such as channels and selectors etc, instead of just > inputstream and outputstream. > > LMY > > -----Original Message----- > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > Sent: Saturday, February 28, 2004 10:09 AM > To: Java RXTX discussion > Subject: Re: [Rxtx] about non-blicking io > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > Dear Trent, > > > > Is there a way to use non-blocking IO with your RXTX? > > > > Best Regards, > > Adrian > > Hi andrian > > > I think you want to look at the timeout and threshold settings. They > should do what you want. > > But maybe you are looking for something more? > > -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Mon Mar 1 18:53:46 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue, 2 Mar 2004 09:53:46 +0800 Subject: [Rxtx] about non-blicking io References: Message-ID: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Hi all, Thank you for your detailed reply Trent. You are always good. ^_< However it would be nice if you can tell me what a thread count is. Is it the number of current executing threads? Recently I am trying to improve the performance of my java program. I found that if I get data using event (as what written in the example SimpleRead.java of Suns), the performance will be slower by 35% than if I get data by calling inputstream.read() after outputstream.write(....). However, the latter one may be blocked if there is no data received. So I am finding a way to let it to be unblocked EVEN the serial port driver doesn't support timeout. So, anyone tries to get data other than the method used in SimpleRead.java? Please share your valuable experience. Best Regards, Adrian ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 12:50 AM Subject: RE: [Rxtx] about non-blicking io > > Hmm > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > right, its selecting on a set of file descriptors so the thread count can > stay low. RXTX currently selects in an event loop for each port. > > nbio is not currently in rxtx. But I see Matt Welsh has released > a library licensed under a BSD license which could be used to do this: > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > always a good thing but I have a hard time picturing the current > implementation running into bottlenecks. I'm curious if Adrian has run > into a problem. > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > i think Adrian is talking about something similar to the NIO feature new in > > Java 1.4, stuff such as channels and selectors etc, instead of just > > inputstream and outputstream. > > > > LMY > > > > -----Original Message----- > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > Sent: Saturday, February 28, 2004 10:09 AM > > To: Java RXTX discussion > > Subject: Re: [Rxtx] about non-blicking io > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > Dear Trent, > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > Best Regards, > > > Adrian > > > > Hi andrian > > > > > > I think you want to look at the timeout and threshold settings. They > > should do what you want. > > > > But maybe you are looking for something more? > > > > > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Mon Mar 1 20:54:56 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 03:54:56 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <000d01c3fff9$35de0c30$0d01a8c0@adrian> Message-ID: On Tue, 2 Mar 2004, Adrian Chu wrote: > Hi all, > > Thank you for your detailed reply Trent. You are always good. ^_< > > However it would be nice if you can tell me what a thread count is. Is it > the number of current executing threads? Yes. Thats what I was thinking of. I think I see what you are looking at below. > > Recently I am trying to improve the performance of my java program. I found > that if I get data using event (as what written in the example > SimpleRead.java of Suns), the performance will be slower by 35% than if I > get data by calling inputstream.read() after outputstream.write(....). > However, the latter one may be blocked if there is no data received. So I am > finding a way to let it to be unblocked EVEN the serial port driver doesn't > support timeout. > > So, anyone tries to get data other than the method used in SimpleRead.java? > Please share your valuable experience. This is an area where a little bit of tuning can go a long ways. There are a few things to think about. First the penalty of calling acrossed the JNI is expensive from what I saw. So one of the worst things you could do is read one byte at a time on each data available event rather than read the number of bytes available. Another thing to think about is select() in the eventLoop()/SerialImp.c will not block while data is available. So the eventLoop either spins or you can force it to sleep(). To keep the eventLoop from spinning, rxtx sleeps in the eventLoop after sending data available. Maybe this sleep() is the performance difference you see. This is something that can be tuned more to your liking. Using a scope (I wasnt sure about the calibration) it looked like you can tune these so that a loopback device sending a byte, getting data available and reading the byte can happen in about 10 ms with Linux and 8 ms with w32. I had tried to make the sleeps so that CPU use was not noticable while data was available. One last though, rxtx does not buffer. The underlying drivers may buffer, but rxtx reads and writes when asked. For the sleep(), look for void report_serial_events( struct event_info_struct *eis ) in SerialImp.c. Thats called from the eventLoop. There is a usleep(20000) there; 20 ms. Obviously it can be less. > > Best Regards, > Adrian > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Tuesday, March 02, 2004 12:50 AM > Subject: RE: [Rxtx] about non-blicking io > > > > > > Hmm > > > > http://java.sun.com/j2se/1.4.2/docs/guide/nio/index.html If I read this > > right, its selecting on a set of file descriptors so the thread count can > > stay low. RXTX currently selects in an event loop for each port. > > > > nbio is not currently in rxtx. But I see Matt Welsh has released > > a library licensed under a BSD license which could be used to do this: > > > > http://www.eecs.harvard.edu/~mdw/proj/java-nbio/ > > > > I'm not sure this is a problem in rxtx. Keeping thread counts low is > > always a good thing but I have a hard time picturing the current > > implementation running into bottlenecks. I'm curious if Adrian has run > > into a problem. > > > > On Mon, 1 Mar 2004, Minya Liang wrote: > > > > > i think Adrian is talking about something similar to the NIO feature new > in > > > Java 1.4, stuff such as channels and selectors etc, instead of just > > > inputstream and outputstream. > > > > > > LMY > > > > > > -----Original Message----- > > > From: Trent Jarvi [mailto:taj at www.linux.org.uk] > > > Sent: Saturday, February 28, 2004 10:09 AM > > > To: Java RXTX discussion > > > Subject: Re: [Rxtx] about non-blicking io > > > > > > > > > On Sat, 28 Feb 2004, Adrian Chu wrote: > > > > > > > Dear Trent, > > > > > > > > Is there a way to use non-blocking IO with your RXTX? > > > > > > > > Best Regards, > > > > Adrian > > > > > > Hi andrian > > > > > > > > > I think you want to look at the timeout and threshold settings. They > > > should do what you want. > > > > > > But maybe you are looking for something more? > > > > > > > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Mon Mar 1 17:12:38 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 01:12:38 +0100 Subject: [Rxtx] Please help Message-ID: <4043D176.5050003@vodafone.it> Hi, i'm developing my thesis work and i'm going crazy with rxtx! I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all sun's commapi reference in my classpath but there is something stiil wrong... When i run my work i catch thath exception: | java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver I've tried to change the ClassLoading that way: System.setSecurityManager(null); String driverName = "gnu.io.RXTXCommDriver"; try { CommDriver commDriver = (CommDriver) Class.forName(driverName).newInstance(); commDriver.initialize(); } catch (Exception e) { e.printStackTrace(); } and now the exception is: java.lang.UnsatisfiedLinkError: nativeGetVersion at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) What's wrong? Please help me! Thanx, Max | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040302/2a441714/attachment-0004.html From taj at www.linux.org.uk Tue Mar 2 01:06:01 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 08:06:01 +0000 (GMT) Subject: [Rxtx] Please help In-Reply-To: <4043D176.5050003@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Hi, > i'm developing my thesis work and i'm going crazy with rxtx! > I've downloaded rxtx.2.1.6, i build it with MingW, i've deleted all > sun's commapi reference in my classpath but there is something stiil > wrong... > > When i run my work i catch thath exception: > | > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > I've tried to change the ClassLoading that way: > > System.setSecurityManager(null); > String driverName = "gnu.io.RXTXCommDriver"; > try { > CommDriver commDriver = (CommDriver) > Class.forName(driverName).newInstance(); > commDriver.initialize(); > } catch (Exception e) { > e.printStackTrace(); > } > > and now the exception is: > > java.lang.UnsatisfiedLinkError: nativeGetVersion > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > > What's wrong? > > Please help me! > Thanx, Max > | > I ran into this last week. The line in the makefile that is generating the exports looking into the wrong directory. If you look at the i386-*-mingw32 directory created during the build and correct the line in the makefile creating the def to match, the exports will then be fixed during the build. I can show you the exact line if you let us know which Makefile you are building with. There appear to be two different ways the directories lay out: i386-mingw32 and i386-pc-mingw32 The line should be close to: echo EXPORTS >$(DEST)/Serial.def;for i in `nm i386-mingw32/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def A more correct solution would be: ----------------------------------------------vvvvvvv echo EXPORTS >$(DEST)/Serial.def;for i in `nm $(DEST)/rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(DEST)/Serial.def w32 compiles are not the easiest thing to get working. There is also a compiled version on ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Sadly, that machine is going through hd replacement. I can mail the file off the list in the meantime if you like. -- Trent Jarvi taj at www.linux.org.uk From maxcalipari at vodafone.it Tue Mar 2 02:33:25 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:33:25 +0100 Subject: [Rxtx] Please help Message-ID: <404454E5.40100@vodafone.it> Thankx Trent, i've found the problem but isn't at the line mentioned above because in my makefile it's commented. The problem was in the quoted CLASSPATH: wrong: CLASSPATH=-classpath ".;" correct line CLASSPATH=-classpath .; I post my makefile at the end of message, i think it works well for win32 buid. Now i've another problem but i've looked in the mailing-list and i think i'ts jre1.4.2 dependant. I've to build another release or is better tring another jdk? Thanx, Max Error message follows: -------------------------------------------------------------------- Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) at it.unical.deis.lis.MADAMS.testing.Tester.main(Tester.java:41) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2\bin\javaw.exe 0x77F40000 - 0x77FED000 C:\WINDOWS\System32\ntdll.dll 0x77E40000 - 0x77F31000 C:\WINDOWS\system32\kernel32.dll 0x77DA0000 - 0x77E3D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll 0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08136000 C:\j2sdk1.4.2\jre\bin\client\jvm.dll 0x76B00000 - 0x76B2D000 C:\WINDOWS\System32\WINMM.dll 0x5D190000 - 0x5D197000 C:\WINDOWS\System32\serwvdrv.dll 0x5B4B0000 - 0x5B4B7000 C:\WINDOWS\System32\umdmxfrm.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2\jre\bin\hpi.dll 0x00820000 - 0x0082E000 C:\j2sdk1.4.2\jre\bin\verify.dll 0x00830000 - 0x00848000 C:\j2sdk1.4.2\jre\bin\java.dll 0x00850000 - 0x0085D000 C:\j2sdk1.4.2\jre\bin\zip.dll 0x02B40000 - 0x02B5C000 C:\j2sdk1.4.2\jre\bin\jdwp.dll 0x06B60000 - 0x06B65000 C:\j2sdk1.4.2\jre\bin\dt_socket.dll 0x71A30000 - 0x71A45000 C:\WINDOWS\System32\ws2_32.dll 0x71A20000 - 0x71A28000 C:\WINDOWS\System32\WS2HELP.dll 0x719D0000 - 0x71A0C000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll 0x76D20000 - 0x76D37000 C:\WINDOWS\System32\iphlpapi.dll 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll 0x71A10000 - 0x71A18000 C:\WINDOWS\System32\wshtcpip.dll 0x06F50000 - 0x06F60000 D:\Workspace\MADAMS\rxtxSerial.dll 0x73D00000 - 0x73D27000 C:\WINDOWS\System32\crtdll.dll 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll 0x6DA30000 - 0x6DAAD000 C:\WINDOWS\system32\DBGHELP.dll 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 355K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 69% used [0x10010000, 0x10068e68, 0x10090000) from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000) tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000) compacting perm gen total 4096K, used 1177K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 28% used [0x14010000, 0x14136650, 0x14136800, 0x14410000) Local Time = Tue Mar 02 10:05:45 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION # 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-b28 mixed mode) # ----------------------------------------------------------------------------- Here is my makefile ------------------------------------------------------------------------------ #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2 #path to mingw32 MINGHOME=C:\MinGW # path to install RXTXcomm.jar DOS style path COMMINSTALL=C:\j2sdk1.4.2\lib # path to install the shared libraries DOS style path LIBINSTALL=C:\j2sdk1.4.2\bin # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR=C:\MinGW\lib ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath .; #C:\jdk1..18\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk1.1.8\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L $(LIBDIR) -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmingw32 -lmoldname -lcrtdll # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o SerialImp.o: $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(TARGETLIBS): RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy $(TARGETLIBS) $(LIBINSTALL) uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From maxcalipari at vodafone.it Tue Mar 2 02:55:46 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 10:55:46 +0100 Subject: [Rxtx] Please help Message-ID: <40445A22.2030300@vodafone.it> Ok i've tried the binary 2.1.7.pre17 and it works fine. Let's go to next bug in my work......... From maxcalipari at vodafone.it Tue Mar 2 08:06:50 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 16:06:50 +0100 Subject: [Rxtx] Driving rs232-rs485 converter Message-ID: <4044A30A.1050901@vodafone.it> Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max From ricardo.trindade at emation.pt Tue Mar 2 08:34:35 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 2 Mar 2004 15:34:35 -0000 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044A30A.1050901@vodafone.it> Message-ID: do yourself a favor and buy a hardware converter. there are several posts in this list regarding your issue. if you don't know where to look, you can start here : www.rs485.com www.bb-europe.com ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Massimiliano Calipari Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 Para: rxtx at linuxgrrls.org Assunto: [Rxtx] Driving rs232-rs485 converter Does anyone know how to drive a rs-232/rs-485 converter from java? What are the excat steps to do? I know that there is a trick with RTS signal, i've tried various solution (even with java CommAPI) but i can't read data from the converter. (Sending is ok). Here is a bit of code i've unsuccessfully tried : serial.setDTR(true); serial.setRTS(true); //Thread.sleep(500); //same results with or without serialOut.write(packet); serialOut.flush(); //Thread.sleep(500); serial.setRTS(false); //Thread.sleep(waitTime); ..... data reading code Thanx, Max _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From maxcalipari at vodafone.it Tue Mar 2 11:45:26 2004 From: maxcalipari at vodafone.it (Massimiliano Calipari) Date: Tue, 02 Mar 2004 19:45:26 +0100 Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044B076.3050308@vodafone.it> References: <20040302153259.99372.qmail@web13206.mail.yahoo.com> <4044B076.3050308@vodafone.it> Message-ID: <4044D646.6010106@vodafone.it> Sorry Trent, can you send me how to buld xxRS485.dll. I'm looking into he code to resolve dependancies but it's a little bit time consuming for me and i've very poor time before the deadline of my thesis... Thanx a lot From taj at www.linux.org.uk Tue Mar 2 12:06:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 2 Mar 2004 19:06:05 +0000 (GMT) Subject: [Rxtx] Driving rs232-rs485 converter In-Reply-To: <4044D646.6010106@vodafone.it> Message-ID: On Tue, 2 Mar 2004, Massimiliano Calipari wrote: > Sorry Trent, > can you send me how to buld xxRS485.dll. > I'm looking into he code to resolve dependancies but it's a little bit > time consuming for me > and i've very poor time before the deadline of my thesis... RS485Imp.c will not currently build for w32. It could be possible to get it working by using the termios support SerialImp.c does. This is a _very_ problematic area to be trying. The hardware converters are inexpensive and will save you many days of hassle. You should be able to use an inexpensive hardware converter as pointed out earlier with the RS232 support rxtx offers. Kernel developers will not claim their drivers will work reliably with RS485 hacks. People have done things like this in earlier versions of Linux and probably with realtime patches for Linux. These early hacks are why I originally put the code into rxtx. Since then I've had email conversations with kernel developers and have been convinced that trying to do it is a bad idea unless you want to tinker with kernels. We really are trying to save you an unreasonable amount of trouble by recommending the hardware converters. If you are convinced you want to try this in software, I would probably just put the code flip the control lines right into SerialImp.c. That already uses termios.c. You do not want to manipulate the control lines from Java as there would be far to much delay. You would want to do it right in the native code. But be warned, the timing can cause you to pull out hair. I would at lease discuss the previous two replies you got from the mail-list with your advisor before moving forward with a software solution for a problem best solved with inexpensive hardware. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Wed Mar 3 00:27:33 2004 From: achu at cypressasia.com (Adrian Chu) Date: Wed, 3 Mar 2004 15:27:33 +0800 Subject: [Rxtx] Driving rs232-rs485 converter References: Message-ID: <000f01c400f1$01b03520$0d01a8c0@adrian> Massimiliano, are you an italian? from my experience, you ought to find the auto-RTS RS-485 converter instead of changing RTS by yourself, coz i faced 100% communication lost if i change it by myself. You can find the auto-RTS RS-485 converter in http://www.jara.com.cn (model no: 2012E, around US 10) There is also an converter made in UK but it is VERY expensive, around US100 Best Regards, Adrian ----- Original Message ----- From: "Ricardo Trindade" To: "Java RXTX discussion" Sent: Tuesday, March 02, 2004 11:34 PM Subject: RE: [Rxtx] Driving rs232-rs485 converter > do yourself a favor and buy a hardware converter. there are several posts in > this list regarding your issue. > > if you don't know where to look, you can start here : > > www.rs485.com > www.bb-europe.com > > ricardo > > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Massimiliano Calipari > Enviada: ter?a-feira, 2 de Mar?o de 2004 15:07 > Para: rxtx at linuxgrrls.org > Assunto: [Rxtx] Driving rs232-rs485 converter > > > Does anyone know how to drive a rs-232/rs-485 converter from java? > What are the excat steps to do? > I know that there is a trick with RTS signal, i've tried various > solution (even with java CommAPI) but > i can't read data from the converter. (Sending is ok). > > Here is a bit of code i've unsuccessfully tried : > serial.setDTR(true); > serial.setRTS(true); > //Thread.sleep(500); //same results with or without > serialOut.write(packet); > serialOut.flush(); > //Thread.sleep(500); > serial.setRTS(false); > //Thread.sleep(waitTime); > ..... data reading code > Thanx, Max > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From oyvind.harboe at zylin.com Wed Mar 3 04:36:13 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Wed, 03 Mar 2004 12:36:13 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() Message-ID: <1078313772.8051.18.camel@famine> An app that I'm using relies on javax.comm from Sun. When I switch to rxtx.org's implementation, it stopped working and apparently Thread.interrupt() will not abort a SerialInputStream.read() call. Checking the stack-frame, I see that the thread is stuck in the method below: protected native int readArray( byte b[], int off, int len ) throws IOException; Is this correct? This is not a complaint, a bug report or an implicit suggestion as to how things ought or ought not to be. It is just a question to verify that I have interpreted the situation correctly. ?yvind From taj at www.linux.org.uk Wed Mar 3 12:35:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 3 Mar 2004 19:35:13 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078313772.8051.18.camel@famine> Message-ID: On Wed, 3 Mar 2004, ?yvind Harboe wrote: > An app that I'm using relies on javax.comm from Sun. When I switch to > rxtx.org's implementation, it stopped working and apparently > Thread.interrupt() will not abort a SerialInputStream.read() call. > > Checking the stack-frame, I see that the thread is stuck in the method > below: > > protected native int readArray( byte b[], int off, int len ) > throws IOException; > > > Is this correct? > > > This is not a complaint, a bug report or an implicit suggestion as to > how things ought or ought not to be. It is just a question to verify > that I have interpreted the situation correctly. > > ?yvind > > By default, rxtx reads do not have a timeout or threshold set. The default was not documented. With rxtx's current defaults, read will block until it reads the data requested. Currently we do nothing with a Thread.interrupt() to stop the native read. The native code ignores most signals. I suspect your observations are correct. Ideally, rxtx should behave like Sun's CommAPI. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 01:54:12 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:54:12 +0100 Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: References: Message-ID: <1078390452.9557.53.camel@famine> Has there been any discussion of moving RXTX to GNU Classpathx? My thinking is that javax.comm could benefit from the increased exposure. GNU Classpathx then being a one-stop-shop for all your javax.* needs. :-) http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html ?yvind From oyvind.harboe at zylin.com Thu Mar 4 01:59:21 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 09:59:21 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078390761.9557.56.camel@famine> > By default, rxtx reads do not have a timeout or threshold set. The > default was not documented. With rxtx's current defaults, read will block > until it reads the data requested. > > Currently we do nothing with a Thread.interrupt() to stop the native read. > The native code ignores most signals. > > I suspect your observations are correct. Ideally, rxtx should behave like > Sun's CommAPI. Incidentally I also need to use Win32 GCJ for this thing, so Thread.interrupt() is a no go anyway. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:16:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:16:43 +0000 (GMT) Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: <1078390761.9557.56.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > > By default, rxtx reads do not have a timeout or threshold set. The > > default was not documented. With rxtx's current defaults, read will block > > until it reads the data requested. > > > > Currently we do nothing with a Thread.interrupt() to stop the native read. > > The native code ignores most signals. > > > > I suspect your observations are correct. Ideally, rxtx should behave like > > Sun's CommAPI. > > Incidentally I also need to use Win32 GCJ for this thing, so > Thread.interrupt() is a no go anyway. > > ?yvind Interesting. You may want to look here: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz or untarred ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI Thats a snapshot of an earlier version of rxtx that compiles with GCJ on Linux. It should have all the code changes required for the CNI (GCJ). I just did it as a test of GCJ but it appeared to work fine in some simple tests. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Thu Mar 4 02:38:17 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Thu, 04 Mar 2004 10:38:17 +0100 Subject: [Rxtx] Thread.interrupt() on SerialInputStream.read() In-Reply-To: References: Message-ID: <1078393096.9557.60.camel@famine> > Interesting. You may want to look here: > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16.tar.gz > > or untarred > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre16/CNI > > Thats a snapshot of an earlier version of rxtx that compiles with GCJ on > Linux. It should have all the code changes required for the CNI (GCJ). > I just did it as a test of GCJ but it appeared to work fine in some simple > tests. GCJ now supports JNI out of the box, so I don't think CNI has any part to play here. On my very first attempt, RXTX didn't work, but I haven't looked closer yet. ?yvind From taj at www.linux.org.uk Thu Mar 4 02:41:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 4 Mar 2004 09:41:10 +0000 (GMT) Subject: [Rxtx] Moving RXTX to GNU Classpathx In-Reply-To: <1078390452.9557.53.camel@famine> Message-ID: On Thu, 4 Mar 2004, ?yvind Harboe wrote: > Has there been any discussion of moving RXTX to GNU Classpathx? > > My thinking is that javax.comm could benefit from the increased > exposure. GNU Classpathx then being a one-stop-shop for all your > javax.* needs. :-) > > > http://mail.gnu.org/archive/html/classpathx-discuss/2003-11/msg00017.html > > ?yvind > > We have tried combining rxtx in with kaffe in the past but some problems showed up and there was too much going on. We will try again, I'm sure. The kaffe group is great. rxtx is not part of GNU; just a friend :) The authors of GNU Classpath are free to encorperate rxtx into GNU classpath as licensed and copyrighted. There may be valid reasons GNU classpath should not encorperate rxtx; they probably want a javax.comm implementation and Sun's click through licensing for CommAPI may prevent rxtx from ever using that namespace. In practice, its a tossup between people wanting the namespace rxtx uses and Sun's Javax.comm. I'd rather let others worry about such things. -- Trent Jarvi taj at www.linux.org.uk From oyvind.harboe at zylin.com Fri Mar 5 02:06:52 2004 From: oyvind.harboe at zylin.com (=?ISO-8859-1?Q?=D8yvind?= Harboe) Date: Fri, 05 Mar 2004 10:06:52 +0100 Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables Message-ID: <1078477612.11267.23.camel@famine> I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box w/the latest release). A couple of questions: - Which CVS branch should I use? - When compiling a Win32 executeable, my plan was to cross compile from CygWin. cd builddir export CFLAGS='-mno-cygwin' /src/configure --prefix=`pwd`/install make How can I tell RXTX build to use GCJ to build .java -> .class files? gcj -C Foo.java produces Foo.class ?yvind From taj at www.linux.org.uk Fri Mar 5 04:32:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 5 Mar 2004 11:32:47 +0000 (GMT) Subject: [Rxtx] Getting RXTX to work w/GCJ to produce native executables In-Reply-To: <1078477612.11267.23.camel@famine> Message-ID: On Fri, 5 Mar 2004, ?yvind Harboe wrote: > I'm debugging the problems w/GCJ and RXTX(it doesn't work out of the box > w/the latest release). > > A couple of questions: > > - Which CVS branch should I use? > > - When compiling a Win32 executeable, my plan was to cross compile from > CygWin. > > cd builddir > export CFLAGS='-mno-cygwin' > /src/configure --prefix=`pwd`/install > make > > How can I tell RXTX build to use GCJ to build .java -> .class files? > > gcj -C Foo.java > > produces > > Foo.class > I have not tried the JNI features of GCJ mentioned so I can provide little info about how to setup up build scripts or Makefiles with it yet. I have only tried the CNI features and they appear to work as mentioned earlier. You may try modifying the CNI Makefile I used to build on linux as a starting point. ftp://jarvi.dsl.frii.com/pub/to_sort/CNI2/Makefile I see I used "gcj -d . -C *.java" The cross compiling features are not in there for the SerialImp.c and termios.c. Makefile.am that comes with rxtx has the bits for cross compiling. Just look at the bottom for: ################ WIN32 CrossCompiling from here down ####################### What out for hard coded $(target_alias) variables. ie: i386-mingw32. Sometimes that should be i386-pc-mingw32 with more current builds. The CVS you probably want is cvs checkout -r commapi-0-0-1 rxtx-devel Thats rxtx 2.1 with the full API. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 11:55:26 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 10:55:26 -0800 Subject: [Rxtx] Help With Lock Files Message-ID: Hi, I've installed the 2.0.5 release into my RedHat 7.3 box and am continually running into the following error: RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists I've been through the list archives and the various readme files with no luck. Running java 1.4.2_03 and logged on as root. Any ideas? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040307/244cae10/attachment-0004.html From taj at www.linux.org.uk Sun Mar 7 13:16:05 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Mar 2004 20:16:05 +0000 (GMT) Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 7 18:44:57 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 7 Mar 2004 17:44:57 -0800 Subject: [Rxtx] Help With Lock Files In-Reply-To: Message-ID: Hi Trent, I'll give it a try and let you know how it works - I am running as root. Regards, Jim -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Trent Jarvi Sent: Sunday, March 07, 2004 12:16 PM To: Java RXTX discussion Subject: Re: [Rxtx] Help With Lock Files On Sun, 7 Mar 2004, Jim Owen wrote: > Hi, > > I've installed the 2.0.5 release into my RedHat 7.3 box and am continually > running into the following error: RXTX fhs_lock() Error: creating lock file: > /var/lock/LCK..ttyS0: File exists > > I've been through the list archives and the various readme files with no > luck. > > Running java 1.4.2_03 and logged on as root. > > Any ideas? > > Thanks, > Make sure the user trying to run the application is in group uucp/lock as mentioned in the INSTALL file that comes with the source. When set up properly the user should be able to create and remove the lockfile. Also make sure that there is not another application running that is using the port. The pid of the application that is supsected of having the port in use is in the lockfile. finally, Lock files are removed when an application closes a port. Make sure ports are closed before quiting. If the application quits before closing the port a stale lockfile will be left. The next time you run the application the program will mention 'removing stale lockfile' if everything is setup properly. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From ricardo.trindade at emation.pt Mon Mar 8 05:38:28 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 12:38:28 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, I'm trying to download rxtx 2.1-17pre17, and running into some problems. There are several rxtxcomm.jar files available, so I don't know which one to get. Perhpas a non-debug binary release that would contain the .jar, and all the native code would make sense, since that's what most people use. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release On Thu, 19 Feb 2004, Ricardo Trindade wrote: > Hi, > > I won't be able to help, I'm already up to my head in work. I would gladly > test your releases/prereleases though. > > In your opinion, what's the best release this far ? pre17 ? > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on rxtx.org's front page. 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but they have not been checked for possible regressions. Either of these should be OK. There may be small errors I've not noticed. So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They should be fine but testing some is encouraged. For most people, rxtx is working well enough. The downloads have been increasing consistantly while reports of problems have not been rising. There are a few known problems that should be fixed though. 1. Baudrates of 128000 * N may have problems 2. Add a method for re-checking for valid ports 3. Add support in RXTX to specify valid ports on the PC. 4. Adding support for half duplex serial communication. 5. Error events for parity errors. 6. Baudrate of 5 7. serial break time 8. terminating character checking for reads 9. Event listeners need to be added when the port is opened to initialize the native structures. 10. Closing a port from an event listener results in a deadlock. 11. Closing a port without adding an event listener results in a deadlock. Add to this list that it is now known rxtx should not be storing pointers to java data the way it does. This causes problems on freebsd and possibly smp w32 machines. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Mon Mar 8 08:01:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 8 Mar 2004 15:01:51 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Mon Mar 8 08:25:32 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 8 Mar 2004 15:25:32 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: Hi, Regarding the 2.1 files, the jar in one of them is different in size from the other. Which one should I use ? thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: segunda-feira, 8 de Marco de 2004 15:02 Para: Java RXTX discussion Assunto: RE: [Rxtx] rxtx release I've placed the following in ftp that should help. Each tar file has the required jar and native serial and parallel libs. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.zip ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz 2.0 required a minor tweak in the Makefile to build the w32 Parallel library. Mac OS X binaries are in the source tree. That may be easier for Mac OS X users currently as there are files to help with install in there. Please let us know if any problems show up. On Mon, 8 Mar 2004, Ricardo Trindade wrote: > Hi, > > I'm trying to download rxtx 2.1-17pre17, and running into some problems. > There are several rxtxcomm.jar files available, so I don't know which one to > get. > > Perhpas a non-debug binary release that would contain the .jar, and all the > native code would make sense, since that's what most people use. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quinta-feira, 19 de Fevereiro de 2004 14:09 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] rxtx release > > > > On Thu, 19 Feb 2004, Ricardo Trindade wrote: > > > Hi, > > > > I won't be able to help, I'm already up to my head in work. I would > gladly > > test your releases/prereleases though. > > > > In your opinion, what's the best release this far ? pre17 ? > > > > > > RXTX 2.1-7pre16 will be the most tested with the known issues listed on > rxtx.org's front page. > > 2.1-7pre17 and 2.0-7pre1.tar.gz are in sync with incremental changes but > they have not been checked for possible regressions. Either of these > should be OK. There may be small errors I've not noticed. > > So I would recommend 2.1-7pre17 or 2.0-7pre1 as starting points. They > should be fine but testing some is encouraged. > > For most people, rxtx is working well enough. The downloads have been > increasing consistantly while reports of problems have not been rising. > There are a few known problems that should be fixed though. > > 1. Baudrates of 128000 * N may have problems > 2. Add a method for re-checking for valid ports > 3. Add support in RXTX to specify valid ports on the PC. > 4. Adding support for half duplex serial communication. > 5. Error events for parity errors. > 6. Baudrate of 5 > 7. serial break time > 8. terminating character checking for reads > 9. Event listeners need to be added when the port is opened to > initialize the native structures. > 10. Closing a port from an event listener results in a deadlock. > 11. Closing a port without adding an event listener results in a > deadlock. > > Add to this list that it is now known rxtx should not be storing pointers > to java data the way it does. This causes problems on freebsd and > possibly smp w32 machines. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From jeffdl at comcast.net Mon Mar 8 23:12:22 2004 From: jeffdl at comcast.net (Jeff Lacy) Date: Tue, 9 Mar 2004 00:12:22 -0600 (CST) Subject: [Rxtx] RXTX & FreeBSD help requested Message-ID: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Hello all, I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I can't seem to get it working. I'm new to this mailing list, but I've looked on google and the mailing list archive to no avail. I think my problem is that java can't find any ports on my computer. I know that /dev/cuaa0 is my serial port. bash# chmod 666 /dev/cuaa0 bash# export CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver No serial ports found! "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" fail exactly the same. I've successfully built/installed: java version "1.4.2-p6" (freebsd ports) GNU Make 3.80 sun's commapi.jar I would really appreciate anyone's help in getting this working! If there is any more information I can provide, please just tell me. From taj at www.linux.org.uk Mon Mar 8 23:30:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Mar 2004 06:30:53 +0000 (GMT) Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: <1057.192.168.0.2.1078812742.squirrel@192.168.0.2> Message-ID: On Tue, 9 Mar 2004, Jeff Lacy wrote: > Hello all, > > I'm trying to run rxtx (in cvs, rxtx-devel) on my freebsd 5.1 system. I > can't seem to get it working. I'm new to this mailing list, but I've > looked on google and the mailing list archive to no avail. I think my > problem is that java can't find any ports on my computer. I know that > /dev/cuaa0 is my serial port. > > bash# chmod 666 /dev/cuaa0 > bash# export > CLASSPATH=/usr/local/jdk1.4.2/jre/lib/ext/RXTXcomm.jar:/home/jeff/hvac/commapi/samples/BlackBox/BlackBox.jar:/usr/local/jdk1.4.2/jre/lib/ext/comm.jar > bash# java -Dgnu.io.rxtx.SerialPorts=/dev/cuaa0 BlackBox > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre17 > Java lib Version = RXTX-2.1-7pre17 > Caught java.lang.ClassCastException while loading driver > gnu.io.RXTXCommDriver > No serial ports found! > > > "java -Dgnu.io.rxtx.SerialPorts=/dev/ttyd0 BlackBox" and "java BlackBox" > fail exactly the same. > > I've successfully built/installed: > java version "1.4.2-p6" (freebsd ports) > GNU Make 3.80 > sun's commapi.jar > > > I would really appreciate anyone's help in getting this working! If there > is any more information I can provide, please just tell me. Hi Jeff The above problem is fairly easy to fix I suspect. I see you have comm.jar in your classpath. RXTX 2.1 does not work with Sun's comm.jar. The rxtx 2.0 will work with Sun's comm.jar. When deciding on which version to use just follow: javax.comm namespace and use Sun's comm.jar: rxtx 2.0 gnu.io namespace and no need for Sun's comm.jar: rxtx 2.1 Usually if you have source, you just change the imports from javax.comm to gnu.io and use rxtx 2.1. If you dont have source you use rxtx 2.0 with Sun's comm.jar. We have had reports of problems with FreeBSD and RXTX. RXTX currently stores java variables in the native code. This is wrong. I'd be glad to share the patch I have so far (1/2 done?) but this is an area that needs work. It is possible the JRE is now more forgiving on FreeBSD. The JRE will blow up if the problem is still around. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Tue Mar 9 00:32:00 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 9 Mar 2004 09:32:00 +0200 Subject: [Rxtx] RXTX & FreeBSD help requested In-Reply-To: References: Message-ID: <200403090932.00300.ari.suutari@syncrontech.com> Hi, On Tuesday 09 March 2004 08:30, Trent Jarvi wrote: > We have had reports of problems with FreeBSD and RXTX. RXTX currently > stores java variables in the native code. This is wrong. I'd be glad to > share the patch I have so far (1/2 done?) but this is an area that needs > work. It is possible the JRE is now more forgiving on FreeBSD. It is not. > > The JRE will blow up if the problem is still around. It will, 1.4.2 was the one I was using and it crashed. But maybe this depends on application you use. Ari S. 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